  
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spShippingStatusReportCheckUniqueSalesOrder]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [spShippingStatusReportCheckUniqueSalesOrder]
GO

	

CREATE PROCEDURE spShippingStatusReportCheckUniqueSalesOrder

@Req int,
@SalesOrder int
AS

SELECT COUNT(*) 
FROM
	[ShippingStatusReport] 
WHERE @SalesOrder=SalesOrder 
AND @Req <> req



GO

	
  